#include "BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h"
#ifdef __cplusplus
extern "C" {
#endif
btHeightfieldTerrainShape::Range* bullet_NewbtHeightfieldTerrainShapeRange(){
	btHeightfieldTerrainShape::Range* wrap_out = new btHeightfieldTerrainShape::Range();
	return wrap_out;
}

btHeightfieldTerrainShape::Range* bullet_NewbtHeightfieldTerrainShapeRange1(double min,double max){
	btScalar c_arg_min=min;
	btScalar c_arg_max=max;
	btHeightfieldTerrainShape::Range* wrap_out = new btHeightfieldTerrainShape::Range(c_arg_min,c_arg_max);
	return wrap_out;
}

double bullet_btHeightfieldTerrainShapeRange_GetFieldOfMax(btHeightfieldTerrainShape::Range* c_this){
	return (double)(c_this->max);
}

double bullet_btHeightfieldTerrainShapeRange_GetFieldOfMin(btHeightfieldTerrainShape::Range* c_this){
	return (double)(c_this->min);
}

bool bullet_btHeightfieldTerrainShapeRange_overlaps(btHeightfieldTerrainShape::Range* c_this,btHeightfieldTerrainShape::Range* other){
	btHeightfieldTerrainShape::Range const& c_arg_other=(btHeightfieldTerrainShape::Range const&)(*other);
	bool c_out = c_this->overlaps(c_arg_other);
	bool wrap_out = (c_out);
	return wrap_out;
}

btHeightfieldTerrainShape* bullet_NewbtHeightfieldTerrainShape(int heightStickWidth,int heightStickLength,float* heightfieldData,double minHeight,double maxHeight,int upAxis,bool flipQuadEdges){
	int c_arg_heightStickWidth=heightStickWidth;
	int c_arg_heightStickLength=heightStickLength;
	float const * c_arg_heightfieldData=(float const *)(void*)(heightfieldData);
	btScalar c_arg_minHeight=minHeight;
	btScalar c_arg_maxHeight=maxHeight;
	int c_arg_upAxis=upAxis;
	bool c_arg_flipQuadEdges=flipQuadEdges;
	btHeightfieldTerrainShape* wrap_out = new btHeightfieldTerrainShape(c_arg_heightStickWidth,c_arg_heightStickLength,c_arg_heightfieldData,c_arg_minHeight,c_arg_maxHeight,c_arg_upAxis,c_arg_flipQuadEdges);
	return wrap_out;
}

btHeightfieldTerrainShape* bullet_NewbtHeightfieldTerrainShape1(int heightStickWidth,int heightStickLength,double* heightfieldData,double minHeight,double maxHeight,int upAxis,bool flipQuadEdges){
	int c_arg_heightStickWidth=heightStickWidth;
	int c_arg_heightStickLength=heightStickLength;
	double const * c_arg_heightfieldData=(double const *)(void*)(heightfieldData);
	btScalar c_arg_minHeight=minHeight;
	btScalar c_arg_maxHeight=maxHeight;
	int c_arg_upAxis=upAxis;
	bool c_arg_flipQuadEdges=flipQuadEdges;
	btHeightfieldTerrainShape* wrap_out = new btHeightfieldTerrainShape(c_arg_heightStickWidth,c_arg_heightStickLength,c_arg_heightfieldData,c_arg_minHeight,c_arg_maxHeight,c_arg_upAxis,c_arg_flipQuadEdges);
	return wrap_out;
}

btHeightfieldTerrainShape* bullet_NewbtHeightfieldTerrainShape2(int heightStickWidth,int heightStickLength,short* heightfieldData,double heightScale,double minHeight,double maxHeight,int upAxis,bool flipQuadEdges){
	int c_arg_heightStickWidth=heightStickWidth;
	int c_arg_heightStickLength=heightStickLength;
	short const * c_arg_heightfieldData=(short const *)(void*)(heightfieldData);
	btScalar c_arg_heightScale=heightScale;
	btScalar c_arg_minHeight=minHeight;
	btScalar c_arg_maxHeight=maxHeight;
	int c_arg_upAxis=upAxis;
	bool c_arg_flipQuadEdges=flipQuadEdges;
	btHeightfieldTerrainShape* wrap_out = new btHeightfieldTerrainShape(c_arg_heightStickWidth,c_arg_heightStickLength,c_arg_heightfieldData,c_arg_heightScale,c_arg_minHeight,c_arg_maxHeight,c_arg_upAxis,c_arg_flipQuadEdges);
	return wrap_out;
}

btHeightfieldTerrainShape* bullet_NewbtHeightfieldTerrainShape3(int heightStickWidth,int heightStickLength,unsigned char* heightfieldData,double heightScale,double minHeight,double maxHeight,int upAxis,bool flipQuadEdges){
	int c_arg_heightStickWidth=heightStickWidth;
	int c_arg_heightStickLength=heightStickLength;
	unsigned char const * c_arg_heightfieldData=(unsigned char const *)(void*)(heightfieldData);
	btScalar c_arg_heightScale=heightScale;
	btScalar c_arg_minHeight=minHeight;
	btScalar c_arg_maxHeight=maxHeight;
	int c_arg_upAxis=upAxis;
	bool c_arg_flipQuadEdges=flipQuadEdges;
	btHeightfieldTerrainShape* wrap_out = new btHeightfieldTerrainShape(c_arg_heightStickWidth,c_arg_heightStickLength,c_arg_heightfieldData,c_arg_heightScale,c_arg_minHeight,c_arg_maxHeight,c_arg_upAxis,c_arg_flipQuadEdges);
	return wrap_out;
}

btHeightfieldTerrainShape* bullet_NewbtHeightfieldTerrainShape4(int heightStickWidth,int heightStickLength,void* heightfieldData,double heightScale,double minHeight,double maxHeight,int upAxis,PHY_ScalarType heightDataType,bool flipQuadEdges){
	int c_arg_heightStickWidth=heightStickWidth;
	int c_arg_heightStickLength=heightStickLength;
	void const * c_arg_heightfieldData=(void const *)(void*)(heightfieldData);
	btScalar c_arg_heightScale=heightScale;
	btScalar c_arg_minHeight=minHeight;
	btScalar c_arg_maxHeight=maxHeight;
	int c_arg_upAxis=upAxis;
	PHY_ScalarType c_arg_heightDataType=heightDataType;
	bool c_arg_flipQuadEdges=flipQuadEdges;
	btHeightfieldTerrainShape* wrap_out = new btHeightfieldTerrainShape(c_arg_heightStickWidth,c_arg_heightStickLength,c_arg_heightfieldData,c_arg_heightScale,c_arg_minHeight,c_arg_maxHeight,c_arg_upAxis,c_arg_heightDataType,c_arg_flipQuadEdges);
	return wrap_out;
}

btHeightfieldTerrainShape* bullet_NewbtHeightfieldTerrainShape5(int heightStickWidth,int heightStickLength,void* heightfieldData,double maxHeight,int upAxis,bool useFloatData,bool flipQuadEdges){
	int c_arg_heightStickWidth=heightStickWidth;
	int c_arg_heightStickLength=heightStickLength;
	void const * c_arg_heightfieldData=(void const *)(void*)(heightfieldData);
	btScalar c_arg_maxHeight=maxHeight;
	int c_arg_upAxis=upAxis;
	bool c_arg_useFloatData=useFloatData;
	bool c_arg_flipQuadEdges=flipQuadEdges;
	btHeightfieldTerrainShape* wrap_out = new btHeightfieldTerrainShape(c_arg_heightStickWidth,c_arg_heightStickLength,c_arg_heightfieldData,c_arg_maxHeight,c_arg_upAxis,c_arg_useFloatData,c_arg_flipQuadEdges);
	return wrap_out;
}

void bullet_btHeightfieldTerrainShape_buildAccelerator(btHeightfieldTerrainShape* c_this,int chunkSize){
	int c_arg_chunkSize=chunkSize;
	c_this->buildAccelerator(c_arg_chunkSize);
}

void bullet_btHeightfieldTerrainShape_clearAccelerator(btHeightfieldTerrainShape* c_this){
	c_this->clearAccelerator();
}

unsigned char* bullet_btHeightfieldTerrainShape_getHeightfieldRawData(btHeightfieldTerrainShape* c_this){
	unsigned char const * c_out = c_this->getHeightfieldRawData();
	unsigned char* wrap_out = (unsigned char*)(void*)(c_out);
	return wrap_out;
}

btTriangleInfoMap* bullet_btHeightfieldTerrainShape_getTriangleInfoMap(btHeightfieldTerrainShape* c_this){
	btTriangleInfoMap const * c_out = c_this->getTriangleInfoMap();
	btTriangleInfoMap* wrap_out = (btTriangleInfoMap*)(void*)(c_out);
	return wrap_out;
}

btTriangleInfoMap* bullet_btHeightfieldTerrainShape_getTriangleInfoMap1(btHeightfieldTerrainShape* c_this){
	btTriangleInfoMap * c_out = c_this->getTriangleInfoMap();
	btTriangleInfoMap* wrap_out = (btTriangleInfoMap*)(void*)(c_out);
	return wrap_out;
}

int bullet_btHeightfieldTerrainShape_getUpAxis(btHeightfieldTerrainShape* c_this){
	int c_out = c_this->getUpAxis();
	int wrap_out = (c_out);
	return wrap_out;
}

double bullet_btHeightfieldTerrainShape_getUserValue3(btHeightfieldTerrainShape* c_this){
	btScalar c_out = c_this->getUserValue3();
	double wrap_out = (c_out);
	return wrap_out;
}

void bullet_btHeightfieldTerrainShape_getVertex(btHeightfieldTerrainShape* c_this,int x,int y,btVector3* vertex){
	int c_arg_x=x;
	int c_arg_y=y;
	btVector3& c_arg_vertex=(btVector3&)(*vertex);
	c_this->getVertex(c_arg_x,c_arg_y,c_arg_vertex);
}

void bullet_btHeightfieldTerrainShape_performRaycast(btHeightfieldTerrainShape* c_this,btTriangleCallback* callback,btVector3* raySource,btVector3* rayTarget){
	btTriangleCallback * c_arg_callback=(btTriangleCallback *)(void*)(callback);
	btVector3 const& c_arg_raySource=(btVector3 const&)(*raySource);
	btVector3 const& c_arg_rayTarget=(btVector3 const&)(*rayTarget);
	c_this->performRaycast(c_arg_callback,c_arg_raySource,c_arg_rayTarget);
}

void bullet_btHeightfieldTerrainShape_setFlipTriangleWinding(btHeightfieldTerrainShape* c_this,bool flipTriangleWinding){
	bool c_arg_flipTriangleWinding=flipTriangleWinding;
	c_this->setFlipTriangleWinding(c_arg_flipTriangleWinding);
}

void bullet_btHeightfieldTerrainShape_setTriangleInfoMap(btHeightfieldTerrainShape* c_this,btTriangleInfoMap* Map){
	btTriangleInfoMap * c_arg_Map=(btTriangleInfoMap *)(void*)(Map);
	c_this->setTriangleInfoMap(c_arg_Map);
}

void bullet_btHeightfieldTerrainShape_setUseDiamondSubdivision(btHeightfieldTerrainShape* c_this,bool useDiamondSubdivision){
	bool c_arg_useDiamondSubdivision=useDiamondSubdivision;
	c_this->setUseDiamondSubdivision(c_arg_useDiamondSubdivision);
}

void bullet_btHeightfieldTerrainShape_setUserValue3(btHeightfieldTerrainShape* c_this,double value){
	btScalar c_arg_value=value;
	c_this->setUserValue3(c_arg_value);
}

void bullet_btHeightfieldTerrainShape_setUseZigzagSubdivision(btHeightfieldTerrainShape* c_this,bool useZigzagSubdivision){
	bool c_arg_useZigzagSubdivision=useZigzagSubdivision;
	c_this->setUseZigzagSubdivision(c_arg_useZigzagSubdivision);
}

#ifdef __cplusplus
}
#endif
